gnuplot << EOF


# uncomment the next line to output as png image
set terminal png

# save file to "cpu-compare.png"
set output "cpu-compare.png"

# graph a title
set title "ab -n 1000 -c 50 for /app/happy/"

# nicer aspect ratio for image size
   set size 1,0.7

# y-axis grid
   set grid y

# x-axis label
   set xlabel "request"

# ignore the last 100 values due to a bug in ab
   set xrange [0:1000]

# y-axis label
   set ylabel "response time (ms)"

# plot data from "$1" and "$2" and "$3" using column 9 with smooth sbezier lines
   plot "$1" using 9 smooth sbezier with lines title "$1:", "$2" using 9 smooth sbezier with lines title "$2:", "$3" using 9 smooth sbezier with lines title "$3:"

EOF